import UIKit

@available(iOS 2.0, *)
extension QKC where AA :UINavigationController {
		// The top view controller on the stack.
    open func topViewController_qk_g() -> QKC<AA,YY,ZZ, UIViewController? >{
		 self +^ self.value.topViewController
	}

		// Return modal view controller if it exists. Otherwise the top view controller.
    open func visibleViewController_qk_g() -> QKC<AA,YY,ZZ, UIViewController? >{
		 self +^ self.value.visibleViewController
	}

		// The current view controller stack.
    open func viewControllers_qk_s(_ viewControllers:  [UIViewController] ) -> QKC<AA,YY,ZZ, [UIViewController] >{
		return link(next: viewControllers).then_QK { $0.value.viewControllers = viewControllers }
	}
    open func viewControllers_qk_g() -> QKC<AA,YY,ZZ, [UIViewController] >{
		 self +^ self.value.viewControllers
	}

    open func isNavigationBarHidden_qk_s(_ isNavigationBarHidden:  Bool) -> QKC<AA,YY,ZZ, Bool>{
		return link(next: isNavigationBarHidden).then_QK { $0.value.isNavigationBarHidden = isNavigationBarHidden }
	}
    open func isNavigationBarHidden_qk_g() -> QKC<AA,YY,ZZ, Bool>{
		 self +^ self.value.isNavigationBarHidden
	}

		// The navigation bar managed by the controller. Pushing, popping or setting navigation items on a managed navigation bar is not supported.
    open func navigationBar_qk_g() -> QKC<AA,YY,ZZ, UINavigationBar >{
		 self +^ self.value.navigationBar
	}

		// Defaults to YES, i.e. hidden.
    @available(iOS 3.0, *)
    open func isToolbarHidden_qk_s(_ isToolbarHidden:  Bool ) -> QKC<AA,YY,ZZ, Bool >{
		return link(next: isToolbarHidden).then_QK { $0.value.isToolbarHidden = isToolbarHidden }
	}
    @available(iOS 3.0, *)
    open func isToolbarHidden_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.isToolbarHidden
	}

		// For use when presenting an action sheet.
    @available(iOS 3.0, *)
    open func toolbar_qk_g() -> QKC<AA,YY,ZZ, UIToolbar >{
		 self +^ self.value.toolbar
	}

     open func delegate_qk_s(_ delegate:  UINavigationControllerDelegate?) -> QKC<AA,YY,ZZ, UINavigationControllerDelegate?>{
		return link(next: delegate).then_QK { $0.value.delegate = delegate }
	}
     open func delegate_qk_g() -> QKC<AA,YY,ZZ, UINavigationControllerDelegate?>{
		 self +^ self.value.delegate
	}

    @available(iOS 7.0, *)
    open func interactivePopGestureRecognizer_qk_g() -> QKC<AA,YY,ZZ, UIGestureRecognizer? >{
		 self +^ self.value.interactivePopGestureRecognizer
	}

	/// When the keyboard appears, the navigation controller's navigationBar toolbar will be hidden. The bars will remain hidden when the keyboard dismisses, but a tap in the content area will show them.
    @available(iOS 8.0, *)
    open func hidesBarsWhenKeyboardAppears_qk_s(_ hidesBarsWhenKeyboardAppears:  Bool) -> QKC<AA,YY,ZZ, Bool>{
		return link(next: hidesBarsWhenKeyboardAppears).then_QK { $0.value.hidesBarsWhenKeyboardAppears = hidesBarsWhenKeyboardAppears }
	}
    @available(iOS 8.0, *)
    open func hidesBarsWhenKeyboardAppears_qk_g() -> QKC<AA,YY,ZZ, Bool>{
		 self +^ self.value.hidesBarsWhenKeyboardAppears
	}

	/// When the user swipes, the navigation controller's navigationBar & toolbar will be hidden (on a swipe up) or shown (on a swipe down). The toolbar only participates if it has items.
    @available(iOS 8.0, *)
    open func hidesBarsOnSwipe_qk_s(_ hidesBarsOnSwipe:  Bool) -> QKC<AA,YY,ZZ, Bool>{
		return link(next: hidesBarsOnSwipe).then_QK { $0.value.hidesBarsOnSwipe = hidesBarsOnSwipe }
	}
    @available(iOS 8.0, *)
    open func hidesBarsOnSwipe_qk_g() -> QKC<AA,YY,ZZ, Bool>{
		 self +^ self.value.hidesBarsOnSwipe
	}

	/// The gesture recognizer that triggers if the bars will hide or show due to a swipe. Do not change the delegate or attempt to replace this gesture by overriding this method.
    @available(iOS 8.0, *)
    open func barHideOnSwipeGestureRecognizer_qk_g() -> QKC<AA,YY,ZZ, UIPanGestureRecognizer >{
		 self +^ self.value.barHideOnSwipeGestureRecognizer
	}

	/// When the UINavigationController's vertical size class is compact, hide the UINavigationBar and UIToolbar. Unhandled taps in the regions that would normally be occupied by these bars will reveal the bars.
    @available(iOS 8.0, *)
    open func hidesBarsWhenVerticallyCompact_qk_s(_ hidesBarsWhenVerticallyCompact:  Bool) -> QKC<AA,YY,ZZ, Bool>{
		return link(next: hidesBarsWhenVerticallyCompact).then_QK { $0.value.hidesBarsWhenVerticallyCompact = hidesBarsWhenVerticallyCompact }
	}
    @available(iOS 8.0, *)
    open func hidesBarsWhenVerticallyCompact_qk_g() -> QKC<AA,YY,ZZ, Bool>{
		 self +^ self.value.hidesBarsWhenVerticallyCompact
	}

	/// When the user taps, the navigation controller's navigationBar & toolbar will be hidden or shown, depending on the hidden state of the navigationBar. The toolbar will only be shown if it has items to display.
    @available(iOS 8.0, *)
    open func hidesBarsOnTap_qk_s(_ hidesBarsOnTap:  Bool) -> QKC<AA,YY,ZZ, Bool>{
		return link(next: hidesBarsOnTap).then_QK { $0.value.hidesBarsOnTap = hidesBarsOnTap }
	}
    @available(iOS 8.0, *)
    open func hidesBarsOnTap_qk_g() -> QKC<AA,YY,ZZ, Bool>{
		 self +^ self.value.hidesBarsOnTap
	}

	/// The gesture recognizer used to recognize if the bars will hide or show due to a tap in content. Do not change the delegate or attempt to replace this gesture by overriding this method.
    @available(iOS 8.0, *)
     open func barHideOnTapGestureRecognizer_qk_g() -> QKC<AA,YY,ZZ, UITapGestureRecognizer >{
		 self +^ self.value.barHideOnTapGestureRecognizer
	}

		// Uses a horizontal slide transition. Has no effect if the view controller is already in the stack.
    open func pushViewController_qk_f(_ viewController: UIViewController, animated: Bool) -> QKC<AA,YY,ZZ, UIViewController>{
		 self +^ self.value.pushViewController(viewController, animated:animated) +^ viewController
	}

		// Returns the popped controller.
    open func popViewController_qk_f(animated: Bool) -> QKC<AA,YY,ZZ,UIViewController? >{
		 self +^ self.value.popViewController(animated:animated)
	}

		// Pops view controllers until the one specified is on top. Returns the popped controllers.
    open func popToViewController_qk_f(_ viewController: UIViewController, animated: Bool) -> QKC<AA,YY,ZZ,[UIViewController]? >{
		 self +^ self.value.popToViewController(viewController, animated:animated)
	}

		// Pops until there's only a single view controller left on the stack. Returns the popped controllers.
    open func popToRootViewController_qk_f(animated: Bool) -> QKC<AA,YY,ZZ,[UIViewController]? >{
		 self +^ self.value.popToRootViewController(animated:animated)
	}

		// If animated is YES, then simulate a push or pop depending on whether the new top view controller was previously in the stack.
    @available(iOS 3.0, *)
    open func setViewControllers_qk_f(_ viewControllers: [UIViewController], animated: Bool) -> QKC<AA,YY,ZZ, [UIViewController]>{
		 self +^ self.value.setViewControllers(viewControllers, animated:animated) +^ viewControllers
	}

		// Hide or show the navigation bar. If animated, it will transition vertically using UINavigationControllerHideShowBarDuration.
    open func setNavigationBarHidden_qk_f(_ hidden: Bool, animated: Bool) -> QKC<AA,YY,ZZ, Bool>{
		 self +^ self.value.setNavigationBarHidden(hidden, animated:animated) +^ hidden
	}

		// Hide or show the toolbar at the bottom of the screen. If animated, it will transition vertically using UINavigationControllerHideShowBarDuration.
    @available(iOS 3.0, *)
    open func setToolbarHidden_qk_f(_ hidden: Bool, animated: Bool) -> QKC<AA,YY,ZZ, Bool>{
		 self +^ self.value.setToolbarHidden(hidden, animated:animated) +^ hidden
	}

		// Interpreted as pushViewController:animated:
    @available(iOS 8.0, *)
    open func show_qk_f(_ vc: UIViewController, sender: Any?) -> QKC<AA,YY,ZZ, UIViewController>{
		 self +^ self.value.show(vc, sender:sender) +^ vc
	}

}

extension QKC where AA :UIViewController {
		// Created on-demand so that a view controller may customize its navigation appearance.
    open func navigationItem_qk_g() -> QKC<AA,YY,ZZ, UINavigationItem >{
		 self +^ self.value.navigationItem
	}

		// If YES, then when this view controller is pushed into a controller hierarchy with a bottom bar (like a tab bar), the bottom bar will slide out. Default is NO.
    open func hidesBottomBarWhenPushed_qk_s(_ hidesBottomBarWhenPushed:  Bool ) -> QKC<AA,YY,ZZ, Bool >{
		return link(next: hidesBottomBarWhenPushed).then_QK { $0.value.hidesBottomBarWhenPushed = hidesBottomBarWhenPushed }
	}
    open func hidesBottomBarWhenPushed_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.hidesBottomBarWhenPushed
	}

		// If this view controller has been pushed onto a navigation controller, return it.
    open func navigationController_qk_g() -> QKC<AA,YY,ZZ, UINavigationController? >{
		 self +^ self.value.navigationController
	}

}

extension QKC where AA :UIViewController {
    @available(iOS 3.0, *)
    open func toolbarItems_qk_s(_ toolbarItems:  [UIBarButtonItem]?) -> QKC<AA,YY,ZZ, [UIBarButtonItem]?>{
		return link(next: toolbarItems).then_QK { $0.value.toolbarItems = toolbarItems }
	}
    @available(iOS 3.0, *)
    open func toolbarItems_qk_g() -> QKC<AA,YY,ZZ, [UIBarButtonItem]?>{
		 self +^ self.value.toolbarItems
	}

    @available(iOS 3.0, *)
    open func setToolbarItems_qk_f(_ toolbarItems: [UIBarButtonItem]?, animated: Bool) -> QKC<AA,YY,ZZ, [UIBarButtonItem]?>{
		 self +^ self.value.setToolbarItems(toolbarItems, animated:animated) +^ toolbarItems
	}

}

